|
|
|
|
|
|
|
How do you bring up a code window for a particular control? |
|
|
|
|
|
|
|
|
Answer: Double-click the control. Right-click the control and select View Code. |
|
|
|
|
|
|
|
|
Name four of the different data types supported by Visual Basic. |
|
|
|
|
|
|
|
|
Answer: String, Double, Single, Byte, Integer, Long, Currency, Date, and Variant. |
|
|
|
|
|
|
|
|
Declare three local variables using the three types you listed for the previous question. (Be sure to use the naming standards.) |
|
|
|
 |
|
|
|
|
Dim strName As String
Dim lngValue As Long
Dim intValue As Integer
Dim dblValue As Double
Dim sngValue As Single
Dim vntValue As Variant
Dim curValue As Currency
Dim bytValue As Byte
Dim dtValue As Date |
|
|
|
|
|
|
|
|
What will the following code display on a form? |
|
|
|
 |
|
|
|
|
Dim vntString
vntString = "100"
vntString = vntString + 50
Print vntString |
|
|
|
|
|
|
|
|
Chapter 7: Arrays, Types, and Constants |
|
|
|
|
|
|
|
|
What will the following code produce? |
|
|
|
 |
|
|
|
|
Dim aintValues() As Integer
ReDim aintValues(1)
aintValues(0) = 10
Print aintValues(0) |
|
|
|
|
|